Skip to content

fix(http2): remove host header when using http2#3516

Merged
robjtede merged 3 commits intoactix:masterfrom
joelwurtz:fix/http2-with-host
Dec 29, 2024
Merged

fix(http2): remove host header when using http2#3516
robjtede merged 3 commits intoactix:masterfrom
joelwurtz:fix/http2-with-host

Conversation

@joelwurtz
Copy link
Copy Markdown
Contributor

@joelwurtz joelwurtz commented Dec 7, 2024

PR Type

Fix

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

Fix #3495

The host header is not used in http2 as this information should be read from ":authority" pseudo header, so it's safe to ignore this header and will fix nginx returning a 400 bad request response when having this header on a http2 request

Copy link
Copy Markdown
Member

@robjtede robjtede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes sense...

@robjtede
Copy link
Copy Markdown
Member

...premised on the fact that a proxy layer doing H2 -> H1 conversions should add a Host header back in to the request flow

@robjtede robjtede enabled auto-merge December 29, 2024 16:41
@robjtede robjtede added this pull request to the merge queue Dec 29, 2024
Merged via the queue into actix:master with commit 856480c Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

awc: HTTP2 + set Host header + nginx server = 400 bad request

2 participants